home *** CD-ROM | disk | FTP | other *** search
- Path: howland.reston.ans.net!psinntp!psinntp!psinntp!psinntp!usenet
- From: grantp@usa.pipeline.com(Pete Grant)
- Newsgroups: comp.lang.c++
- Subject: Re: Coding Standards
- Date: 24 Mar 1996 17:05:10 GMT
- Organization: Kalevi, Inc.
- Message-ID: <4j3vc6$nrk@news1.h1.usa.pipeline.com>
- References: <4j2kgg$svj@sam.inforamp.net>
- NNTP-Posting-Host: 38.8.120.9
- X-PipeUser: grantp
- X-PipeHub: usa.pipeline.com
- X-PipeGCOS: (Pete Grant)
- X-Newsreader: Pipeline v3.5.0
-
- On Mar 24, 1996 04:53:18 in article <Re: Coding Standards>,
- 'rmorin@inforamp.net (Randy Charles Morin)' wrote:
-
-
- >In article <4iuu6k$6a6@druid.borland.com>,
- >pete@borland.com (Pete Becker) wrote:
- >>Unfortunately, if you don't follow guidelines like this, you will miss
- your
- >>subsequent maintenance deadlines by many years. You'll spend all your
- time
- >>tracking down mysterious failures that arise when you try to enhance the
-
- >>program, rather than spending time on the enhancements themselves.
- >
- >But if you follow these guidelines, your initial release will miss your
- >subsequent maintenance deadlines. You have to be reasonable in these
- >situations.
-
- Right. I will nearly always vote on the side of reasonableness. Seems
- to me that since writing a trivial copy constructor can be implemented
- in a matter of seconds, it's just a good habit to write one even if its
- need isn't obvious at the time the class is in its initial stages of
- development. I doubt seriously if a few seconds, or even a minute or
- two, spent at writing a copy constructor for all classes will cause
- significant delays in product delivery.
-
- > Why not make the standard that if you add a data member that may
- >cause the default copy constructor to produce erroneous results, then
- >make one explicitly? This way you only have to write them when you need
- >to and you have the same end result.
- >
- If we can rely on the maintenance programmer to think about the
- problem, then OK, but that's not the real world. IMHO, Pete Becker is
- absolutely correct in this matter -- well, maybe he exaggerated just
- a little bit...
-
- --
- Pete Grant
- Kalevi, Inc.
- Software Engineering & development
-